<!doctype html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
    <head>
        <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
        <%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
        <%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
        <%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
        <%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
        <script type="text/javascript" src="${path}/html/js/js-jsp/common/select-plugin.js?v=1"></script>
        <script>
            var source = "${source}";
        </script>
        <script type="text/javascript"
                src="${path}/html/js/js-jsp/vi/videoProject/videoProjectOption.js?v=<%out.print(Math.random());%>"></script>
    </head>
    <body>
        <div class="place">
            <span>当前位置：</span>
            <ul class="placeul">
                <c:if test="${source == null}">
                    <li><a href="${path}/videoProject/index.do">视频配置</a></li>
                </c:if>
                <c:if test="${source != null && source == 'deviceManage'}">
                    <li><a href="${path}/device/index.do">设备管理</a></li>
                </c:if>
                <c:if test="${videoProject.vpId == null}">
                    <li><a>添加视频配置</a></li>
                </c:if>
                <c:if test="${videoProject.vpId != null}">
                    <li><a>修改视频配置</a></li>
                </c:if>
            </ul>
        </div>

        <form id="videoProject_form" class="form" method="post" action="#">
            <div class="formbody">
                <div style="margin-top: 40px;"><span></span></div>
                <ul class="forminfo">
                    <li>
                        <input type="hidden" name="vpId" id="vpId" value="${videoProject.vpId}"/>
                        <input type="hidden" name="prId" id="prId_" value="${videoProject.prId}"/>
                        <label style="text-align:right;">所属项目：</label>
                        <input class="easyui-combobox" id="prId" validType="selectNotEmpty['所属项目']" style="width:255px; height: 30px"
                               data-options="editable:false"/>
                    </li>
                    <li>
                        <input type="hidden" name="userUuid" id="userUuid_" value="${videoProject.userUuid}"/>
                        <label style="text-align:right;">所属视频用户：</label>
                        <input class="easyui-combobox" id="userUuid" validType="selectNotEmpty['所属视频用户']" data-options="editable:false"
                               style="width:255px; height: 30px"/>
                    </li>
                    <li>
                        <label style="text-align:right;">设备名称：</label>
                        <input class="easyui-textbox" name="vpName" id="vpName" data-options="validType:'length[1,15]', prompt:'请输入项目视频设备名称'"
                               style="width:255px; height: 30px" value="${videoProject.vpName}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">设备编号：</label>
                        <input class="easyui-textbox" name="deviceId" id="deviceId" data-options="prompt:'请输入设备编号',validType:'length[1,60]' "
                               style="width:255px; height: 30px" value="${videoProject.deviceId}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">ip地址：</label>
                        <input class="easyui-textbox" name="videoIp" data-options="required:true,prompt:'请输入ip地址',validType:'length[1,32]' "
                               style="width:255px; height: 30px" value="${videoProject.videoIp}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">用户名：</label>
                        <input class="easyui-textbox" name="viUserName" data-options="required:true,prompt:'请输入用户名',validType:'length[1,32]' "
                               style="width:255px; height: 30px" value="${videoProject.viUserName}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">密码：</label>
                        <input class="easyui-textbox" name="viPassword" data-options="required:true,prompt:'请输入密码',validType:'length[1,32]' "
                               style="width:255px; height: 30px" value="${videoProject.viPassword}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">负责人：</label>
                        <input class="easyui-textbox" name="principal" id="principal"
                               data-options="prompt:'请输入负责人',validType:'length[1,5]'" style="width:255px; height: 30px"
                               value="${videoProject.principal}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">负责人电话：</label>
                        <input class="easyui-textbox" name="principalTel" id="principalTel"
                               data-options="prompt:'请输入负责人电话',validType:'mobile',precision:0" style="width:255px; height: 30px"
                               value="${videoProject.principalTel}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">布点位置：</label>
                        <input class="easyui-textbox" name="distributionLocation" id="distributionLocation"
                               data-options="prompt:'请输入布点位置',validType:'length[1,25]'" style="width:255px; height: 30px"
                               value="${videoProject.distributionLocation}"/>
                    </li>
                    <li>
                        <label style="text-align:right;">布点经度：</label>
                        <input class="easyui-textbox" name="longitude" id="longitude"
                               data-options="precision:6,prompt:'请输入布点经度'" style="width:255px; height: 30px"
                               value="${videoProject.longitude}" validType="longitude"/>
                    </li>
                    <li>
                        <label style="text-align:right;">布点纬度：</label>
                        <input class="easyui-textbox" name="latitude" id="latitude" data-options="precision:6,prompt:'请输入布点纬度'"
                               style="width:255px; height: 30px" value="${videoProject.latitude}" validType="latitude"/>
                    </li>
                    <li>
                        <label style="text-align:right;">视频地址：</label>
                        <input class="easyui-textbox" name="videoMu38Url" id="videoMu38Url" data-options="prompt:'请输入视频流地址',validType:'length[1,200]'"
                               style="width:255px; height: 30px" value="${videoProject.videoMu38Url}" />
                    </li>
                    <li>
                        <label style="text-align:right;">插件地址：</label>
                        <input class="easyui-textbox" name="videoUrl" id="videoUrl" data-options="prompt:'请输入视频插件地址',validType:'length[1,200]'"
                               style="width:255px; height: 30px" value="${videoProject.videoUrl}" />
                    </li>
                    <li>
                        <label style="text-align:right;">视频状态：</label>
                        <select class="easyui-combobox" name="onLineStatus" data-options="required:true"
                                style="width:255px; height: 32px" editable="false">
                            <option value="1" ${videoProject.onLineStatus == 1 ? " selected=\"selected\""  : ""}>在线</option>
                            <option value="2" ${videoProject.onLineStatus == 2 ? " selected=\"selected\""  : ""}>离线</option>
                        </select>
                    </li>
                    <li>
                        <label style="vertical-align: top;">视频描述：</label>
                        <input class="easyui-textbox" name="description" id="description"
                               data-options="multiline:true,validType:'length[1,200]',prompt:'请输入视频描述'"
                               style="width:255px;height:80px" value="${videoProject.description}"/>
                    </li>
                    <li>
                        <label style="vertical-align: top;">备注信息：</label>
                        <input class="easyui-textbox" name="remark" id="remark"
                               data-options="multiline:true,validType:'length[1,200]',prompt:'请输入视频备注信息'"
                               style="width:255px;height:80px" value="${videoProject.remark}"/>
                    </li>
                </ul>
            </div>
        </form>
        <div class="formbody" style="margin-left: 120px">
            <a id="optionVideoProject" class="easyui-linkbutton c1" style="width:100px; height: 35px">保存</a>
            &nbsp;&nbsp;&nbsp;
            <c:if test="${source == null}">
                <a href="${path}/videoProject/index.do" class="easyui-linkbutton c1" style="width:100px; height: 35px">取消</a>
            </c:if>
            <c:if test="${source != null && source == 'deviceManage'}">
                <a href="${path}/device/index.do" class="easyui-linkbutton c1" style="width:100px; height: 35px">取消</a>
            </c:if>
        </div>
    </body>
</html>